/**
 * @author Yuliy Khorolinskyy
 *
 * Reaktionsspiel challengesManager
 *
 * 23.01.2012
 */
package challengesManager;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import challengeGUI.CharacterSearchGUI;
import control.Control;
import data.ChallengeData;
import data.Player;

/**
 * @author Yuliy
 *
 */
public class CharacterSearchManager extends ChallengeManagerAdapter<CharacterSearchGUI> {


	public CharacterSearchManager(Control c, ChallengeData d) {
		super(c, d);
	}

	@Override
	public void initGui(JPanel placeHolderPanel) {
		this.gui = new CharacterSearchGUI(this);
		super.initGui(placeHolderPanel);
	}

	@Override
	public void animationOver() {
		c.updateScores();
		this.processingPlayerAction = false;
		if(this.pointsDistributed < d.getRounds()){
			buzzEventHasOccured = false;
			gui.newRound();
		}else{
			setState(STATE_FINISHED);
			c.enableBuzzing();
		}
	}

}
